<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<link rel="stylesheet" type="text/css" href="../css/animate.css" />
<script src="../js/common/jquery.js"></script>
<script src="../js/common/drag.js"></script>
<script src="../js/common/angular.min.js"></script>
<script src="../js/common/angular-animate.min.js"></script>
<script type="text/javascript" src="../js/common/common.js"></script>
<script type="text/javascript" src="../js/animate.js"></script>
</head>
<body ng-app="myAnimation">

<div class="dqwz">
    <span>当前位置：</span>
    <span>AngularJS 动画</span>
</div>

<section>
    <div ng-controller="checkCtrl">
        <h3>【勾选复选框隐藏 DIV】</h3>
        <p><input type="checkbox" name="" ng-model="bool" /></p>
        <p ng-hide="bool" class="myCheck">
        </p>
        <!-- 查看源码开始 -->
        <div class="htmlCode">
            <span>【html源码】</span>
            <xmp ng-non-bindable>
<p><input type="checkbox" name="" ng-model="bool" /></p>
<p ng-hide="bool" class="myCheck">
</p>
            </xmp>
            <span>【css源码】</span>
            <xmp ng-non-bindable>
.myCheck{
    transition: all linear 0.2s;
    background-color: red;
    height: 100px;
    width: 100px;
    position: relative;
    top: 0;
    left: 0;
    display: block;
}
.ng-hide {
    height: 0;
    width: 0;
    background-color: transparent;
    top:-20px;
    left: 0px;
}

            </xmp>
            <span>【js源码】</span>
            <xmp>
app_ani.controller('checkCtrl',function($scope){
    //代码块
})
            </xmp>
            <span class="close"><a href="javascript:;">关闭</a></span>
        </div>
        <div class="viewCode">
            <span><a href="javascript:;"> >>查看源码</a></span>
        </div>
        <!-- 查看源码结束 -->
    </div>
    <div ng-controller="clickCtrl">
        <h3>【点击按钮隐藏 DIV】</h3>
        <button type="button" ng-click="toggle()">点击我</button>
        <p ng-hide="bool" class="myCheck"></p>
        <!-- 查看源码开始 -->
        <div class="htmlCode">
            <span>【html源码】</span>
            <xmp ng-non-bindable>
<button type="button" ng-click="toggle()">点击我</button>
<p ng-hide="bool" class="myCheck"></p>
            </xmp>
            <span>【css源码】</span>
            <xmp ng-non-bindable>
.myCheck{
    transition: all linear 0.2s;
    background-color: red;
    height: 100px;
    width: 100px;
    position: relative;
    top: 0;
    left: 0;
    display: block;
}
.ng-hide {
    height: 0;
    width: 0;
    background-color: transparent;
    top:-20px;
    left: 0px;
}

            </xmp>
            <span>【js源码】</span>
            <xmp>
app_ani.controller('clickCtrl',function($scope){
    $scope.bool = false;
    $scope.toggle = function(){
        $scope.bool = !$scope.bool;
    }
})
            </xmp>
            <span class="close"><a href="javascript:;">关闭</a></span>
        </div>
        <div class="viewCode">
            <span><a href="javascript:;"> >>查看源码</a></span>
        </div>
        <!-- 查看源码结束 -->
    </div>
</section>

<div class="mask_layer">
</div>

</body>
</html>